<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="js/bootstrap.min.js"></script>
<div class="navbar">
  <div class="navbar-inner">
    <a class="brand" href="Home">Swim 2</a>
    <ul class="nav">
      <% session = request.getSession();
      	String status;
      	status = (String) session.getAttribute("status");
      	if(status == null) {
      		status = new String("guest");
      		session.setAttribute("status", "guest");
      	}
      	%>
      	<li class="dropdown">
	  		<a class="dropdown-toggle" data-toggle="dropdown" href="#">
	    		Search
	    	<span class="caret"></span>
	  		</a>
	  		<ul class="dropdown-menu">
		    			<li><a href="Search?param=ability">Search By Ability</a></li>
	    		 <%  if (!status.equals("guest")) { %>
		    		 <li><a href="Search?param=Name">Search By Name</a></li>
		    	<% } %> 
	  		</ul>
		</li>
		<% if(status.equals("admin")) { %>
		<li class="divider-vertical"></li>
	 	<li><a href="ManageAbilities">Manage Abilities</a></li>
	 	<li class="divider-vertical"></li>
		<% } if (!status.equals("guest")) { %>
			<!-- <li><a href="Notifications">Notifications</a></li>
			<li class="divider-vertical"></li>  -->
			<li><a href="ViewFriendsRequests">Friend Req.</a></li>
			<li><a href="ViewHelpRequests">Help Req.</a></li>
			<% if (status.equals("admin")) { %>
				<li><a href="ViewAbilityRequests">Ability Req.</a></li>
				<li class="divider-vertical"></li>
		<% }
		} %>
    </ul>
    <ul class="nav pull-right">
	<% if(!status.equals("guest")) { %>
		<li class="divider-vertical"></li>
	 	<li><a href="Profile?id=<% out.print(session.getAttribute("id")); %>"> You are logged in as: <b><% out.print(session.getAttribute("email")); %></b></a></li>
	 	<li><a href="Logout">Logout</a></li>
  	<% } else { %>
	 	<li class="divider-vertical"></li>
	 	<li><a href="Login">Login</a></li>
	 	<li class="divider-vertical"></li>
  		<li><a href="Register">Register</a></li>
  	<% } %>
    </ul>
  </div>
</div>
